#include "Button.h"
using namespace std;


Button::Button(int x, int y, int w, int h, char* path)
{
	box.x = x;
	box.y = y;
	box.w = w;
	box.h = h;

	image = SDL_LoadBMP(path);
	clip = &box;
}

SDL_Rect Button::GetBox()
{
	SDL_Rect result;
	result.x = box.x;
	result.y = box.y;
	result.h = box.h;
	result.w = box.w;
	return result;
}


void Button::show(SDL_Surface* screen)
{
    SDL_BlitSurface(image, NULL, screen, clip);
	SDL_Flip(screen);
}